package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是maintenance_history的数据传输对象基类,直接与表对应<br>
 */
public abstract class MaintenanceHistoryModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id = 0;
    /**
     * 属性:维护人员<br>
     * 含义:维护人员<br>
     */
    private Integer addLineUser = 0;
    /**
     * 属性:addTime<br>
     */
    private Date addTime = new Date();
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime = new Date();
    /**
     * 属性:运维说明<br>
     * 含义:运维说明<br>
     */
    private String maintenanceExplain = "";
    /**
     * 属性:设备号<br>
     * 含义:设备号<br>
     */
    private String terminal = "";
    /**
     * 属性:仓道故障<br>
     * 含义:仓道故障<br>
     */
    private Integer positionError = 0;
    /**
     * 属性:售线异常<br>
     * 含义:售线异常<br>
     */
    private Integer sellLineError = 0;
    /**
     * 属性:借充电宝异常<br>
     * 含义:借充电宝异常<br>
     */
    private Integer borrowCDBError = 0;
    /**
     * 属性:充电线异常<br>
     * 含义:充电线异常<br>
     */
    private Integer chargerLineError = 0;
    /**
     * 属性:回收仓异常<br>
     * 含义:回收仓异常<br>
     */
    private Integer giveBackPositionError = 0;
    /**
     * 属性:网络故障<br>
     * 含义:网络故障<br>
     */
    private Integer networkFailure = 0;
    /**
     * 属性:日常维护<br>
     * 含义:日常维护<br>
     */
    private Integer dailyMaintenance = 0;
    /**
     * 属性:补充电宝<br>
     * 含义:补充电宝<br>
     */
    private Integer addCDB = 0;
    /**
     * 属性:补线<br>
     * 含义:补线<br>
     */
    private Integer addLine = 0;
    /**
     * 属性:其它<br>
     * 含义:其它<br>
     */
    private Integer other = 0;
    /**
     * 属性:充电宝数量差异<br>
     * 含义:充电宝数量差异<br>
     */
    private Integer lineNumDifference = 0;
    
    private String typeText = "";

    /**
     *  默认构造方法,构造一个默认的MaintenanceHistoryModelBase对象
     */
    public MaintenanceHistoryModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public MaintenanceHistoryModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.addLineUser = rs.getInt("addLineUser");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.maintenanceExplain = rs.getString("maintenanceExplain");
               this.terminal = rs.getString("terminal");
               this.positionError = rs.getInt("positionError");
               this.sellLineError = rs.getInt("sellLineError");
               this.borrowCDBError = rs.getInt("borrowCDBError");
               this.chargerLineError = rs.getInt("chargerLineError");
               this.giveBackPositionError = rs.getInt("giveBackPositionError");
               this.networkFailure = rs.getInt("networkFailure");
               this.dailyMaintenance = rs.getInt("dailyMaintenance");
               this.addCDB = rs.getInt("addCDB");
               this.addLine = rs.getInt("addLine");
               this.other = rs.getInt("other");
               this.lineNumDifference = rs.getInt("lineNumDifference");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }

    public String getTypeText() {
		return typeText;
	}

	public void setTypeText(String typeText) {
		this.typeText = typeText;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性维护人员<br>
     * 含义:维护人员<br>
     * @param addLineUser 待设置的属性维护人员的值
     */
    public void setAddLineUser(Integer addLineUser) {
        this.addLineUser = addLineUser;
    }

    /**
     * 获取属性维护人员<br>
     * 含义:维护人员<br>
     * @return 属性维护人员的值
     */
    public Integer getAddLineUser() {
        return addLineUser;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置属性运维说明<br>
     * 含义:运维说明<br>
     * @param explain 待设置的属性运维说明的值
     */
    public void setMaintenanceExplain(String maintenanceExplain) {
        this.maintenanceExplain = maintenanceExplain;
    }

    /**
     * 获取属性运维说明<br>
     * 含义:运维说明<br>
     * @return 属性运维说明的值
     */
    public String getMaintenanceExplain() {
        return maintenanceExplain;
    }

    /**
     * 设置属性设备号<br>
     * 含义:设备号<br>
     * @param terminal 待设置的属性设备号的值
     */
    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    /**
     * 获取属性设备号<br>
     * 含义:设备号<br>
     * @return 属性设备号的值
     */
    public String getTerminal() {
        return terminal;
    }

    /**
     * 设置属性仓道故障<br>
     * 含义:仓道故障<br>
     * @param positionError 待设置的属性仓道故障的值
     */
    public void setPositionError(Integer positionError) {
        this.positionError = positionError;
    }

    /**
     * 获取属性仓道故障<br>
     * 含义:仓道故障<br>
     * @return 属性仓道故障的值
     */
    public Integer getPositionError() {
        return positionError;
    }

    /**
     * 设置属性售线异常<br>
     * 含义:售线异常<br>
     * @param sellLineError 待设置的属性售线异常的值
     */
    public void setSellLineError(Integer sellLineError) {
        this.sellLineError = sellLineError;
    }

    /**
     * 获取属性售线异常<br>
     * 含义:售线异常<br>
     * @return 属性售线异常的值
     */
    public Integer getSellLineError() {
        return sellLineError;
    }

    /**
     * 设置属性借充电宝异常<br>
     * 含义:借充电宝异常<br>
     * @param borrowCDBError 待设置的属性借充电宝异常的值
     */
    public void setBorrowCDBError(Integer borrowCDBError) {
        this.borrowCDBError = borrowCDBError;
    }

    /**
     * 获取属性借充电宝异常<br>
     * 含义:借充电宝异常<br>
     * @return 属性借充电宝异常的值
     */
    public Integer getBorrowCDBError() {
        return borrowCDBError;
    }

    /**
     * 设置属性充电线异常<br>
     * 含义:充电线异常<br>
     * @param chargerLineError 待设置的属性充电线异常的值
     */
    public void setChargerLineError(Integer chargerLineError) {
        this.chargerLineError = chargerLineError;
    }

    /**
     * 获取属性充电线异常<br>
     * 含义:充电线异常<br>
     * @return 属性充电线异常的值
     */
    public Integer getChargerLineError() {
        return chargerLineError;
    }

    /**
     * 设置属性回收仓异常<br>
     * 含义:回收仓异常<br>
     * @param giveBackPositionError 待设置的属性回收仓异常的值
     */
    public void setGiveBackPositionError(Integer giveBackPositionError) {
        this.giveBackPositionError = giveBackPositionError;
    }

    /**
     * 获取属性回收仓异常<br>
     * 含义:回收仓异常<br>
     * @return 属性回收仓异常的值
     */
    public Integer getGiveBackPositionError() {
        return giveBackPositionError;
    }

    /**
     * 设置属性网络故障<br>
     * 含义:网络故障<br>
     * @param networkFailure 待设置的属性网络故障的值
     */
    public void setNetworkFailure(Integer networkFailure) {
        this.networkFailure = networkFailure;
    }

    /**
     * 获取属性网络故障<br>
     * 含义:网络故障<br>
     * @return 属性网络故障的值
     */
    public Integer getNetworkFailure() {
        return networkFailure;
    }

    /**
     * 设置属性日常维护<br>
     * 含义:日常维护<br>
     * @param dailyMaintenance 待设置的属性日常维护的值
     */
    public void setDailyMaintenance(Integer dailyMaintenance) {
        this.dailyMaintenance = dailyMaintenance;
    }

    /**
     * 获取属性日常维护<br>
     * 含义:日常维护<br>
     * @return 属性日常维护的值
     */
    public Integer getDailyMaintenance() {
        return dailyMaintenance;
    }

    /**
     * 设置属性补充电宝<br>
     * 含义:补充电宝<br>
     * @param addCDB 待设置的属性补充电宝的值
     */
    public void setAddCDB(Integer addCDB) {
        this.addCDB = addCDB;
    }

    /**
     * 获取属性补充电宝<br>
     * 含义:补充电宝<br>
     * @return 属性补充电宝的值
     */
    public Integer getAddCDB() {
        return addCDB;
    }

    /**
     * 设置属性补线<br>
     * 含义:补线<br>
     * @param addLine 待设置的属性补线的值
     */
    public void setAddLine(Integer addLine) {
        this.addLine = addLine;
    }

    /**
     * 获取属性补线<br>
     * 含义:补线<br>
     * @return 属性补线的值
     */
    public Integer getAddLine() {
        return addLine;
    }

    /**
     * 设置属性其它<br>
     * 含义:其它<br>
     * @param other 待设置的属性其它的值
     */
    public void setOther(Integer other) {
        this.other = other;
    }

    /**
     * 获取属性其它<br>
     * 含义:其它<br>
     * @return 属性其它的值
     */
    public Integer getOther() {
        return other;
    }

    /**
     * 设置属性充电宝数量差异<br>
     * 含义:充电宝数量差异<br>
     * @param lineNumDifference 待设置的属性充电宝数量差异的值
     */
    public void setLineNumDifference(Integer lineNumDifference) {
        this.lineNumDifference = lineNumDifference;
    }

    /**
     * 获取属性充电宝数量差异<br>
     * 含义:充电宝数量差异<br>
     * @return 属性充电宝数量差异的值
     */
    public Integer getLineNumDifference() {
        return lineNumDifference;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof MaintenanceHistoryModelBase)) {
            return false;
        }

        final MaintenanceHistoryModelBase otherModel = (MaintenanceHistoryModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
